﻿@model List<ManyToManyAgain.Models.HomeIndexViewModel>
<br />
@foreach (var m in Model)
{
    <div class="well">
        @Html.LabelFor(r => m.Title): @m.Title
        @Html.LabelFor(r => m.Artist): @m.Artist

        <table class=" table table-bordered">
            <thead>
                <tr>
                    <th>Song Title</th>
                    <th>DateReleased</th>
                </tr>
            </thead>
            <tbody>
                @foreach(var l in m.AlbumSongs)
                {
                    <tr>
                        <td>@l.Title</td>
                        <td>@l.DateReleased</td>
                    </tr>
                }
            </tbody>

        </table>
    </div>

    /*
    <div class="well">
        <table class="table table-bordered">
            <thead>
                <th>Title</th>
                <th>Arist</th>
                <th>Album Id (Temp)</th>
            </thead>
            <tbody>
                <tr>
                    <td>@m.Title</td>
                    <td>@m.Artist</td>
                    <td>@m.AlbumId</td>
                </tr>
            @foreach (var r in m.AlbumSongs)
            {
                <tr>
                    <td>@r.Title</td>
                    <td>@r.DateReleased</td>
                </tr>
            </tbody>
        </table>



    </div>
   */

}